from rest_framework.pagination import PageNumberPagination


class StandardPagination(PageNumberPagination):
    """
    分页接口自定义参数
    """

    page_size = 10  # 每页显示10个对象
    page_size_query_param = 'page_size'  # 允许客户端通过查询参数来覆盖默认的page_size
    max_page_size = 100  # 最大允许每页显示100个对象
    page_query_param = "page_num"
